package com.nine.demo.config;

import com.nine.demo.properties.MinioProperties;
import io.minio.MinioClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author nine
 * @version 1.0
 * @description minio 相关配置信息
 * @date 2024-08-04 12:16
 */
@Configuration
public class MinioConfig {

	@Autowired
	private MinioProperties minioProperties;

	@Bean
	public MinioClient minioClient() {
		return MinioClient.builder().endpoint(minioProperties.getEndpoint()).credentials(minioProperties.getAccessKey(), minioProperties.getSecretKey()).build();
	}


}
